package Demo2;

import Demo4.IAmphibious;
import Demo4.IRuning;
import Demo4.ISwimming;

import java.sql.SQLOutput;

/*
 *Description:
 *User:laoHu
 *Created with Intellij IDEA 2025
 *Data:2025.05.00
 *Time:00:00
 */
public class Frog extends Animal implements IAmphibious {

    public Frog(String name, int age) {
        super(name, age);
    }

    @Override
    public  void eat(){
        System.out.println(this.name + "在吃小虫子...");
    }

//    @Override
//    public void run() {
//        System.out.println(this.name + "陆地上跳....");
//    }

    @Override
    public void swim() {
        System.out.println(this.name + "在池塘里游泳....");
    }
}
